﻿using System.Windows;
using nRoute.Components.Composition;
using Orktane.ScriptActionModel;

namespace Orktane.Sample.ConsoleApp.ScriptActions
{
    [MapScriptAction("SHOWMSG", "Show Message", ShortDescription = "Shows a message via a Message Box.", 
        UnListed = true, Lifetime = InstanceLifetime.Singleton)]
    public class ShowMsgScriptAction 
        : IScriptAction
    {

#region IScriptAction Members

        public void Execute(Arguments args)
        {
            if (args != null || !string.IsNullOrEmpty(args.CommandLine))
            {
                MessageBox.Show(args.CommandLine);
            }
        }

#endregion

    }
}